package whlogger.launcher.loginfields.views.behavior;

import javax.swing.JTextField;

/**
 *
 * @author d3rbastl3r
 */
public class NicknameJTextFieldBehavior extends AbstractJTextFieldBehavior{
    public static final String TEXT_STANDART = "Name";
    
    private JTextField				component	= null;
    
    public NicknameJTextFieldBehavior(JTextField component){
        this.component	= component;
        initFocusListener();
    }
    
    private void initFocusListener(){
        this.component.addFocusListener(new java.awt.event.FocusAdapter() {
            @Override
            public void focusGained(java.awt.event.FocusEvent evt){
                doActivate();
            }
            
            @Override
            public void focusLost(java.awt.event.FocusEvent evt){
                doDeactivate();
            }
        });
    }

    @Override
    protected String getStandartText() {
        return TEXT_STANDART;
    }

    @Override
    protected JTextField getJTextField() {
        return this.component;
    }
}